#! /bin/bash

phen2gene_git='https://gitee.com/zhuying/Phen2Gene'

source_dir=phen2gene_raw

target_dir=phen2gene

git clone $phen2gene_git $source_dir
mkdir -p $target_dir/lib/outdated_HP 
cp  $source_dir/lib/outdated_HP/* $target_dir/lib/outdated_HP/
for filename in prioritize.py weight_assignment.py calculation.py output.py json_format.py
do
    cp $source_dir/lib/$filename $target_dir/lib/$filename
done
cp $source_dir/phen2gene.py $target_dir/phen2gene.py
sed -i 's:from lib.:from .lib.:g' $target_dir/phen2gene.py
touch $target_dir/lib/__init__.py
touch $target_dir/__init__.py
rm -rf $source_dir